/*
** @file unicode-emoj-tables.h
** @author Vincent Wei
** @date 2022/10/22
** @brief Some operators to check Emoji.
**  Note that we copied this file from GPL'd MiniGUI:
**      <https://github.com/VincentWei/MiniGUI/>
**
** Copyright (C) 2022 FMSoft <https://www.fmsoft.cn>
**
** This file is a part of purc, which is an HVML interpreter with
** a command line interface (CLI).
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/

/* == Start of generated table == */
/*
 * The following tables are generated by running:
 *
 *   ./gen-emoji-table.py
 *
 * on emoji/emoji-data.txt file with this header:
 *
 * # emoji-data.txt
 * # Date: 2019-01-15, 12:10:05 GMT
 * # © 2019 Unicode®, Inc.
 * # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
 * # For terms of use, see http://www.unicode.org/terms_of_use.html
 * #
 * # Emoji Data for UTS #51
 * # Version: 12.0
 * #
 * # For documentation and usage, see http://www.unicode.org/reports/tr51
 */

#ifndef purc_foil_unicode_unicode_emoji_tables_h
#define purc_foil_unicode_unicode_emoji_tables_h

struct Interval {
  uint32_t start, end;
};

static const struct Interval _unicode_emoji_table[] =
{
  {0x0023, 0x0023},
  {0x002A, 0x002A},
  {0x0030, 0x0039},
  {0x00A9, 0x00A9},
  {0x00AE, 0x00AE},
  {0x203C, 0x203C},
  {0x2049, 0x2049},
  {0x2122, 0x2122},
  {0x2139, 0x2139},
  {0x2194, 0x2199},
  {0x21A9, 0x21AA},
  {0x231A, 0x231B},
  {0x2328, 0x2328},
  {0x23CF, 0x23CF},
  {0x23E9, 0x23F3},
  {0x23F8, 0x23FA},
  {0x24C2, 0x24C2},
  {0x25AA, 0x25AB},
  {0x25B6, 0x25B6},
  {0x25C0, 0x25C0},
  {0x25FB, 0x25FE},
  {0x2600, 0x2604},
  {0x260E, 0x260E},
  {0x2611, 0x2611},
  {0x2614, 0x2615},
  {0x2618, 0x2618},
  {0x261D, 0x261D},
  {0x2620, 0x2620},
  {0x2622, 0x2623},
  {0x2626, 0x2626},
  {0x262A, 0x262A},
  {0x262E, 0x262F},
  {0x2638, 0x263A},
  {0x2640, 0x2640},
  {0x2642, 0x2642},
  {0x2648, 0x2653},
  {0x265F, 0x2660},
  {0x2663, 0x2663},
  {0x2665, 0x2666},
  {0x2668, 0x2668},
  {0x267B, 0x267B},
  {0x267E, 0x267F},
  {0x2692, 0x2697},
  {0x2699, 0x2699},
  {0x269B, 0x269C},
  {0x26A0, 0x26A1},
  {0x26AA, 0x26AB},
  {0x26B0, 0x26B1},
  {0x26BD, 0x26BE},
  {0x26C4, 0x26C5},
  {0x26C8, 0x26C8},
  {0x26CE, 0x26CF},
  {0x26D1, 0x26D1},
  {0x26D3, 0x26D4},
  {0x26E9, 0x26EA},
  {0x26F0, 0x26F5},
  {0x26F7, 0x26FA},
  {0x26FD, 0x26FD},
  {0x2702, 0x2702},
  {0x2705, 0x2705},
  {0x2708, 0x270D},
  {0x270F, 0x270F},
  {0x2712, 0x2712},
  {0x2714, 0x2714},
  {0x2716, 0x2716},
  {0x271D, 0x271D},
  {0x2721, 0x2721},
  {0x2728, 0x2728},
  {0x2733, 0x2734},
  {0x2744, 0x2744},
  {0x2747, 0x2747},
  {0x274C, 0x274C},
  {0x274E, 0x274E},
  {0x2753, 0x2755},
  {0x2757, 0x2757},
  {0x2763, 0x2764},
  {0x2795, 0x2797},
  {0x27A1, 0x27A1},
  {0x27B0, 0x27B0},
  {0x27BF, 0x27BF},
  {0x2934, 0x2935},
  {0x2B05, 0x2B07},
  {0x2B1B, 0x2B1C},
  {0x2B50, 0x2B50},
  {0x2B55, 0x2B55},
  {0x3030, 0x3030},
  {0x303D, 0x303D},
  {0x3297, 0x3297},
  {0x3299, 0x3299},
  {0x1F004, 0x1F004},
  {0x1F0CF, 0x1F0CF},
  {0x1F170, 0x1F171},
  {0x1F17E, 0x1F17F},
  {0x1F18E, 0x1F18E},
  {0x1F191, 0x1F19A},
  {0x1F1E6, 0x1F1FF},
  {0x1F201, 0x1F202},
  {0x1F21A, 0x1F21A},
  {0x1F22F, 0x1F22F},
  {0x1F232, 0x1F23A},
  {0x1F250, 0x1F251},
  {0x1F300, 0x1F321},
  {0x1F324, 0x1F393},
  {0x1F396, 0x1F397},
  {0x1F399, 0x1F39B},
  {0x1F39E, 0x1F3F0},
  {0x1F3F3, 0x1F3F5},
  {0x1F3F7, 0x1F4FD},
  {0x1F4FF, 0x1F53D},
  {0x1F549, 0x1F54E},
  {0x1F550, 0x1F567},
  {0x1F56F, 0x1F570},
  {0x1F573, 0x1F57A},
  {0x1F587, 0x1F587},
  {0x1F58A, 0x1F58D},
  {0x1F590, 0x1F590},
  {0x1F595, 0x1F596},
  {0x1F5A4, 0x1F5A5},
  {0x1F5A8, 0x1F5A8},
  {0x1F5B1, 0x1F5B2},
  {0x1F5BC, 0x1F5BC},
  {0x1F5C2, 0x1F5C4},
  {0x1F5D1, 0x1F5D3},
  {0x1F5DC, 0x1F5DE},
  {0x1F5E1, 0x1F5E1},
  {0x1F5E3, 0x1F5E3},
  {0x1F5E8, 0x1F5E8},
  {0x1F5EF, 0x1F5EF},
  {0x1F5F3, 0x1F5F3},
  {0x1F5FA, 0x1F64F},
  {0x1F680, 0x1F6C5},
  {0x1F6CB, 0x1F6D2},
  {0x1F6D5, 0x1F6D5},
  {0x1F6E0, 0x1F6E5},
  {0x1F6E9, 0x1F6E9},
  {0x1F6EB, 0x1F6EC},
  {0x1F6F0, 0x1F6F0},
  {0x1F6F3, 0x1F6FA},
  {0x1F7E0, 0x1F7EB},
  {0x1F90D, 0x1F93A},
  {0x1F93C, 0x1F945},
  {0x1F947, 0x1F971},
  {0x1F973, 0x1F976},
  {0x1F97A, 0x1F9A2},
  {0x1F9A5, 0x1F9AA},
  {0x1F9AE, 0x1F9CA},
  {0x1F9CD, 0x1F9FF},
  {0x1FA70, 0x1FA73},
  {0x1FA78, 0x1FA7A},
  {0x1FA80, 0x1FA82},
  {0x1FA90, 0x1FA95},
};

static const struct Interval _unicode_emoji_presentation_table[] =
{
  {0x231A, 0x231B},
  {0x23E9, 0x23EC},
  {0x23F0, 0x23F0},
  {0x23F3, 0x23F3},
  {0x25FD, 0x25FE},
  {0x2614, 0x2615},
  {0x2648, 0x2653},
  {0x267F, 0x267F},
  {0x2693, 0x2693},
  {0x26A1, 0x26A1},
  {0x26AA, 0x26AB},
  {0x26BD, 0x26BE},
  {0x26C4, 0x26C5},
  {0x26CE, 0x26CE},
  {0x26D4, 0x26D4},
  {0x26EA, 0x26EA},
  {0x26F2, 0x26F3},
  {0x26F5, 0x26F5},
  {0x26FA, 0x26FA},
  {0x26FD, 0x26FD},
  {0x2705, 0x2705},
  {0x270A, 0x270B},
  {0x2728, 0x2728},
  {0x274C, 0x274C},
  {0x274E, 0x274E},
  {0x2753, 0x2755},
  {0x2757, 0x2757},
  {0x2795, 0x2797},
  {0x27B0, 0x27B0},
  {0x27BF, 0x27BF},
  {0x2B1B, 0x2B1C},
  {0x2B50, 0x2B50},
  {0x2B55, 0x2B55},
  {0x1F004, 0x1F004},
  {0x1F0CF, 0x1F0CF},
  {0x1F18E, 0x1F18E},
  {0x1F191, 0x1F19A},
  {0x1F1E6, 0x1F1FF},
  {0x1F201, 0x1F201},
  {0x1F21A, 0x1F21A},
  {0x1F22F, 0x1F22F},
  {0x1F232, 0x1F236},
  {0x1F238, 0x1F23A},
  {0x1F250, 0x1F251},
  {0x1F300, 0x1F320},
  {0x1F32D, 0x1F335},
  {0x1F337, 0x1F37C},
  {0x1F37E, 0x1F393},
  {0x1F3A0, 0x1F3CA},
  {0x1F3CF, 0x1F3D3},
  {0x1F3E0, 0x1F3F0},
  {0x1F3F4, 0x1F3F4},
  {0x1F3F8, 0x1F43E},
  {0x1F440, 0x1F440},
  {0x1F442, 0x1F4FC},
  {0x1F4FF, 0x1F53D},
  {0x1F54B, 0x1F54E},
  {0x1F550, 0x1F567},
  {0x1F57A, 0x1F57A},
  {0x1F595, 0x1F596},
  {0x1F5A4, 0x1F5A4},
  {0x1F5FB, 0x1F64F},
  {0x1F680, 0x1F6C5},
  {0x1F6CC, 0x1F6CC},
  {0x1F6D0, 0x1F6D2},
  {0x1F6D5, 0x1F6D5},
  {0x1F6EB, 0x1F6EC},
  {0x1F6F4, 0x1F6FA},
  {0x1F7E0, 0x1F7EB},
  {0x1F90D, 0x1F93A},
  {0x1F93C, 0x1F945},
  {0x1F947, 0x1F971},
  {0x1F973, 0x1F976},
  {0x1F97A, 0x1F9A2},
  {0x1F9A5, 0x1F9AA},
  {0x1F9AE, 0x1F9CA},
  {0x1F9CD, 0x1F9FF},
  {0x1FA70, 0x1FA73},
  {0x1FA78, 0x1FA7A},
  {0x1FA80, 0x1FA82},
  {0x1FA90, 0x1FA95},
};

static const struct Interval _unicode_emoji_modifier_table[] =
{
  {0x1F3FB, 0x1F3FF},
};

static const struct Interval _unicode_emoji_modifier_base_table[] =
{
  {0x261D, 0x261D},
  {0x26F9, 0x26F9},
  {0x270A, 0x270D},
  {0x1F385, 0x1F385},
  {0x1F3C2, 0x1F3C4},
  {0x1F3C7, 0x1F3C7},
  {0x1F3CA, 0x1F3CC},
  {0x1F442, 0x1F443},
  {0x1F446, 0x1F450},
  {0x1F466, 0x1F478},
  {0x1F47C, 0x1F47C},
  {0x1F481, 0x1F483},
  {0x1F485, 0x1F487},
  {0x1F48F, 0x1F48F},
  {0x1F491, 0x1F491},
  {0x1F4AA, 0x1F4AA},
  {0x1F574, 0x1F575},
  {0x1F57A, 0x1F57A},
  {0x1F590, 0x1F590},
  {0x1F595, 0x1F596},
  {0x1F645, 0x1F647},
  {0x1F64B, 0x1F64F},
  {0x1F6A3, 0x1F6A3},
  {0x1F6B4, 0x1F6B6},
  {0x1F6C0, 0x1F6C0},
  {0x1F6CC, 0x1F6CC},
  {0x1F90F, 0x1F90F},
  {0x1F918, 0x1F91F},
  {0x1F926, 0x1F926},
  {0x1F930, 0x1F939},
  {0x1F93C, 0x1F93E},
  {0x1F9B5, 0x1F9B6},
  {0x1F9B8, 0x1F9B9},
  {0x1F9BB, 0x1F9BB},
  {0x1F9CD, 0x1F9CF},
  {0x1F9D1, 0x1F9DD},
};

static const struct Interval _unicode_extended_pictographic_table[] =
{
  {0x00A9, 0x00A9},
  {0x00AE, 0x00AE},
  {0x203C, 0x203C},
  {0x2049, 0x2049},
  {0x2122, 0x2122},
  {0x2139, 0x2139},
  {0x2194, 0x2199},
  {0x21A9, 0x21AA},
  {0x231A, 0x231B},
  {0x2328, 0x2328},
  {0x2388, 0x2388},
  {0x23CF, 0x23CF},
  {0x23E9, 0x23F3},
  {0x23F8, 0x23FA},
  {0x24C2, 0x24C2},
  {0x25AA, 0x25AB},
  {0x25B6, 0x25B6},
  {0x25C0, 0x25C0},
  {0x25FB, 0x25FE},
  {0x2600, 0x2605},
  {0x2607, 0x2612},
  {0x2614, 0x2685},
  {0x2690, 0x2705},
  {0x2708, 0x2712},
  {0x2714, 0x2714},
  {0x2716, 0x2716},
  {0x271D, 0x271D},
  {0x2721, 0x2721},
  {0x2728, 0x2728},
  {0x2733, 0x2734},
  {0x2744, 0x2744},
  {0x2747, 0x2747},
  {0x274C, 0x274C},
  {0x274E, 0x274E},
  {0x2753, 0x2755},
  {0x2757, 0x2757},
  {0x2763, 0x2767},
  {0x2795, 0x2797},
  {0x27A1, 0x27A1},
  {0x27B0, 0x27B0},
  {0x27BF, 0x27BF},
  {0x2934, 0x2935},
  {0x2B05, 0x2B07},
  {0x2B1B, 0x2B1C},
  {0x2B50, 0x2B50},
  {0x2B55, 0x2B55},
  {0x3030, 0x3030},
  {0x303D, 0x303D},
  {0x3297, 0x3297},
  {0x3299, 0x3299},
  {0x1F000, 0x1F0FF},
  {0x1F10D, 0x1F10F},
  {0x1F12F, 0x1F12F},
  {0x1F16C, 0x1F171},
  {0x1F17E, 0x1F17F},
  {0x1F18E, 0x1F18E},
  {0x1F191, 0x1F19A},
  {0x1F1AD, 0x1F1E5},
  {0x1F201, 0x1F20F},
  {0x1F21A, 0x1F21A},
  {0x1F22F, 0x1F22F},
  {0x1F232, 0x1F23A},
  {0x1F23C, 0x1F23F},
  {0x1F249, 0x1F3FA},
  {0x1F400, 0x1F53D},
  {0x1F546, 0x1F64F},
  {0x1F680, 0x1F6FF},
  {0x1F774, 0x1F77F},
  {0x1F7D5, 0x1F7FF},
  {0x1F80C, 0x1F80F},
  {0x1F848, 0x1F84F},
  {0x1F85A, 0x1F85F},
  {0x1F888, 0x1F88F},
  {0x1F8AE, 0x1F8FF},
  {0x1F90C, 0x1F93A},
  {0x1F93C, 0x1F945},
  {0x1F947, 0x1FFFD},
};

#endif /* purc_foil_unicode_unicode_emoji_tables_h */

/* == End of generated table == */
